<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit Exam Room Information</title>
</head>

<body bgcolor="#CCCCCC">
<br>
<table width="800" height="494" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th height="62" colspan="2" style=" background-color:#F90" scope="col"><font color="#FFFFFF">Exam Room Management<font></th>
  </tr>
  <tr>
    <th width="190" height="427" scope="row" style="background-color:#F90" > <div align="center"><b><font color="#FFFFFF">Menu<font><br><br>
      		{% if room %}	
			<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/{{ room.roomID }}/{{ room.date }}/{{ room.time }}/{{ room.subj }}'" value="Back">
		{% else %}
			<br /><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/'" value="Back">
		{% endif %}
		</center>
    </div>
    </th>
    <td width="610" style="background-color:#FFF">
    <center>
    	<h3>Edit Room Information</h3><br>
    	{% if room %}
	    	<p>Fill information in a text box that you want to change</p>
			<form action="/room/edit/{{ room.roomID }}" method="get">    	
	    	<table class="myTable">
	        <tr><th>Subject</th><th>Old Information</th><th>New Information</th></tr>	                	
	        <tr><td>Room ID</td><td>{{ room.roomID }}</td><td><center><input type="text" maxlength="10" name="id"></center></td></tr>	        	                
        	<tr><td>Capacity</td><td>{{ room.capacity }}</td><td><center><input type="text" maxlength="2" name="cap"></center></td></tr>
        	<tr><td>Subject</td><td>{{ room.subj }}</td>
        	<td><center>
			{% if subjs %}
        	<select name="subj">				
				{% for subj in subjs %}					
					<option value="{{ subj.subjID }}">{{ subj.subjName }}</option>
				{% endfor %}
			</select>
			{% endif %}
        	</center></td></tr>
        	<tr><td>Date</td><td>{{ room.date }}</td>
        	<td><center>
			<select name="day">
				<option value="1" selected>1</option>
				{% for d in days %}					
					<option value="{{ d }}">{{ d }}</option>
				{% endfor %}
			</select>
			<select name="month">
				<option value="1" selected>1</option>
				{% for m in months %}					
					<option value="{{ m }}">{{ m }}</option>
				{% endfor %}
			</select>
			<select name="year">
				<option value="2012" selected>2012</option>					
			</select>
        	</center></td></tr>
        	<tr><td>Time</td><td>{{ room.time }}</td>
        	<td><center>
			<select name="time">
				<option value="9:00-12:00" selected>9:00-12:00</option>
				<option value="13:00-15:00">13:00-15:00</option>
				<option value="13:00-16:00">13:00-16:00</option>
			</select>
        	</center></td></tr>
        </table>
        	<br><br><input type="submit" value="Edit">
        </form>
        {% else %}
        	<p>No Information.</p>
        {% endif %}                        
		</center></td></tr>
		</table>			
<br>
<br>
<br>
</body>
</html>
